package org.openems.entity;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;


public class ParameterConverter {

    public Entity get(byte[] bs) {
        ByteArrayInputStream bis = new ByteArrayInputStream(bs);
        try {
            ObjectInputStream ois = new ObjectInputStream(bis);
            Entity entity = (Entity)ois.readObject();
            return entity;
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        return null;
    }

}
